j3deditor.bin.components
Class ButtonPanelLayout

java.lang.Object
  extended by j3deditor.bin.components.ButtonPanelLayout
All Implemented Interfaces:
java.awt.LayoutManager

public class ButtonPanelLayout
extends java.lang.Object
implements java.awt.LayoutManager

The ButtonPanelLayout class is a layout manager that lays out a container's components in one row/column. The container is divided into equal-sized rectangles, which width and height can be specified.

Author:
Risto Seene

Field Summary
static int HORIZONTAL
          specifies that container's components are layd out in a row.
static int NEGATIVE
          specifies that container's components are layd out from bottom/right to top/left.
static int POSITIVE
          specifies that container's components are layd out from top/left to bottom/right.
static int VERTICAL
          specifies that container's components are layd out in a column.
 
Constructor Summary
ButtonPanelLayout(int width, int height, int type, int direction)
          Creates an instance of ButtonPanelLayout with specified width and height of components and layout order.
ButtonPanelLayout(int width, int height, int space, int type, int direction)
          Creates an instance of ButtonPanelLayout with specified width and height of components, space between them and layout order.
ButtonPanelLayout(int width, int height, int vspace, int hspace, int type, int direction)
          Creates an instance of ButtonPanelLayout with specified width and height of components, space between them and layout order.
 
Method Summary
 void addLayoutComponent(java.lang.String name, java.awt.Component comp)
          Required by LayoutManager, not in use.
 void layoutContainer(java.awt.Container parent)
          Required by LayoutManager.
 java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
          Required by LayoutManager, not in use.
 java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
          Required by LayoutManager, not in use.
 void removeLayoutComponent(java.awt.Component comp)
          Required by LayoutManager, not in use.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HORIZONTAL

public static final int HORIZONTAL
specifies that container's components are layd out in a row.

See Also:
Constant Field Values

VERTICAL

public static final int VERTICAL
specifies that container's components are layd out in a column.

See Also:
Constant Field Values

POSITIVE

public static final int POSITIVE
specifies that container's components are layd out from top/left to bottom/right.

See Also:
Constant Field Values

NEGATIVE

public static final int NEGATIVE
specifies that container's components are layd out from bottom/right to top/left.

See Also:
Constant Field Values
Constructor Detail

ButtonPanelLayout

public ButtonPanelLayout(int width,
                         int height,
                         int type,
                         int direction)
Creates an instance of ButtonPanelLayout with specified width and height of components and layout order.

Parameters:
width - width of componets
height - height of components
type - the way the components are layd out: HORIZONTAL, VERTICAL
direction - direction of components: POSITIVE, NEGATIVE

ButtonPanelLayout

public ButtonPanelLayout(int width,
                         int height,
                         int space,
                         int type,
                         int direction)
Creates an instance of ButtonPanelLayout with specified width and height of components, space between them and layout order.

Parameters:
width - width of componets
height - height of components
space - space between components
type - the way the components are layd out: HORIZONTAL, VERTICAL
direction - direction of components: POSITIVE, NEGATIVE

ButtonPanelLayout

public ButtonPanelLayout(int width,
                         int height,
                         int vspace,
                         int hspace,
                         int type,
                         int direction)
Creates an instance of ButtonPanelLayout with specified width and height of components, space between them and layout order.

Parameters:
width - width of componets
height - height of components
vspace - vertical space between components
hspace - horizontal space between components
type - the way the components are layd out: HORIZONTAL, VERTICAL
direction - direction of components: POSITIVE, NEGATIVE
Method Detail

addLayoutComponent

public void addLayoutComponent(java.lang.String name,
                               java.awt.Component comp)
Required by LayoutManager, not in use.

Specified by:
addLayoutComponent in interface java.awt.LayoutManager
Parameters:
name - doesn't do anything
comp - doesn't do anything

removeLayoutComponent

public void removeLayoutComponent(java.awt.Component comp)
Required by LayoutManager, not in use.

Specified by:
removeLayoutComponent in interface java.awt.LayoutManager
Parameters:
comp - doesn't do anything

preferredLayoutSize

public java.awt.Dimension preferredLayoutSize(java.awt.Container parent)
Required by LayoutManager, not in use.

Specified by:
preferredLayoutSize in interface java.awt.LayoutManager
Parameters:
parent - doesn't do anything
Returns:
null

minimumLayoutSize

public java.awt.Dimension minimumLayoutSize(java.awt.Container parent)
Required by LayoutManager, not in use.

Specified by:
minimumLayoutSize in interface java.awt.LayoutManager
Parameters:
parent - doesn't do anything
Returns:
null

layoutContainer

public void layoutContainer(java.awt.Container parent)
Required by LayoutManager. Lays out the components into the given container.

Specified by:
layoutContainer in interface java.awt.LayoutManager
Parameters:
parent - container which components will be layd out